package Lab1;

import java.util.*;

public class PersonDriver {
	
	public static void main(String[] args) {
		Person jeff = new Person("Jeff", "Jefferey", 20, "Hot Dogs");
		List<Person> allPersons = new ArrayList<Person>();
		final int MAX_LOOPS = 250000;
		int i;
		
		System.out.println("Launching 200000-loop addition to allPersons array.");
		
		for(i=0;i<MAX_LOOPS;i++) {
			allPersons.add(jeff);
		}
		
		System.out.println("Loop complete.");
		System.out.println(allPersons.size());
		
		System.out.println("Beginning 200000-loop removal from allPersons array.");
		
		for (i=0;i<MAX_LOOPS;i++) {
			allPersons.remove(0);
		}
		
		//for (int x=0;x<MAX_LOOPS;x++) {
		//	allPersons.remove(MAX_LOOPS-1-x);
		//}
		
		System.out.println("Removal loop complete.");
		System.out.println(allPersons.size());
	}
}
